class Dog {
    public int age = 3;
    public String name = "无名小犬";
    public String color = "黄色";
    public int weight = 20;

    public void wolf() {
        System.out.println("汪汪汪");
    }
    public void fight(Dog dog2) {
        int n1 = 0, n2 = 0;
        n1 = -Math.abs(this.age - 5) + this.weight;
        n2 = -Math.abs(dog2.age - 5) + dog2.weight;
        if(n1 > n2) {
            System.out.println("小狗" + this.name + "赢了");
        }else if(n1 < n2) {
            System.out.println("小狗" + dog2.name + "赢了");
        }else {
            System.out.println("平局");
        }
    }

    public Dog(int age, String name, String color, int weight) {
        this.age = age;
        this.name = name;
        this.weight = weight;
        this.color = color;
    }

    public Dog(int age, String name, String color) {
        this.age = age;
        this.name = name;
        this.color = color;
    }

}
